﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%@ Import Namespace="PhysicsControlModule.Daos" %>
<%@ Import Namespace="PhysicsControlModule.Security" %>
<%
    if (Request.IsAuthenticated)
    {
%>
Привіт, <b>
    <%= Html.Encode(MmShProvider.GetUser().FirstName + " " + MmShProvider.GetUser().LastName)%></b>!<br />
<% if (HttpContext.Current.User.IsInRole("STUDENT") && MmShProvider.GetUser().GroupId!=null)
   { %>
<%= Html.Encode(GroupDao.GetById((int) MmShProvider.GetUser().GroupId).Name)%>
<% } %>
    <br/>
[
<%= Html.ActionLink("Вихід", "LogOff", "Account") %>
]
<%
    }
    else
    {
%>
[
<%= Html.ActionLink("Вхід", "LogOn", "Account") %>
]
<%
    }
%>
